#region Import section

using System;
using NUnit.Framework;
using SQLTests.Framework;
using SQLRunnerLib.Project;

#endregion

namespace SQLTests.Lib.Project
{
	/// <summary>
	/// Summary description for ProjectTests.
	/// </summary>
	public class ProjectTests:
		AbstractTest
	{
		public ProjectTests()
		{
			//
			// TODO: Add constructor logic here
			//
		}

		[Test]
		public void CreateProjectFile() {
			_project.Serialize(@"C:\project.sqlrunner");
			SQLProject proj = SQLProject.Deserialize(@"C:\project.sqlrunner");
		}

		#region fixtures
		private SQLProject _project;
 
		[TestFixtureSetUp]
		protected override void SetUpFixtures() {
			_project = new SQLProject();
			_project.Extensions.Add("sql");
			Folder folder = new Folder();
			folder.Path = @"C:\";
			folder.IncludeAllFiles = true;
			folder.IncludeAllSubFolders = false;
			Folder subfolder = new Folder();
			subfolder.Path = @"C:\Temp";
			subfolder.IncludeAllFiles = false;
			subfolder.IncludeAllSubFolders = false;
			subfolder.Files.Add("test.sql");
			folder.Folders.Add(subfolder);
			_project.Folders.Add(folder);
		}
		#endregion
	}
}
